package router

import (
	"github.com/gin-gonic/gin"
	"userop_bff/api"
	"userop_bff/middlerware"
)

func InitAddressRouter(r *gin.Engine) {
	AddressRouter := r.Group("address").Use(middlerware.CheckToken())
	{
		//获取地址列表
		AddressRouter.GET("", api.GetAddressList)
		//添加地址
		AddressRouter.POST("", api.CreateAddress)
		//删除地址
		AddressRouter.DELETE("", api.DeleteAddress)
		//更新地址
		AddressRouter.PATCH("", api.UpdateAddress)

	}
	r.GET("health", api.Health)
}
